<?php
namespace frontend\controllers;
use yii\web\Controller;
use yii;
class HomeController extends Controller
{
    public function actionHome()
    {
        $query=Yii::$app->db;
        $command = $query->createCommand('SELECT * FROM jun_cate');
        $posts = $command->queryAll();
        return $this->renderPartial('home',['posts'=>$posts]);
    }
}